package cn.source.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.source.system.mapper.GkMemberSettingMapper;
import cn.source.system.domain.GkMemberSetting;
import cn.source.system.service.IGkMemberSettingService;

/**
 * 用户偏好设置Service业务层处理
 * 
 * @author sourcebyte.vip
 * @date 2025-05-02
 */
@Service
public class GkMemberSettingServiceImpl implements IGkMemberSettingService 
{
    @Autowired
    private GkMemberSettingMapper gkMemberSettingMapper;

    /**
     * 查询用户偏好设置
     * 
     * @param id 用户偏好设置主键
     * @return 用户偏好设置
     */
    @Override
    public GkMemberSetting selectGkMemberSettingById(Long id)
    {
        return gkMemberSettingMapper.selectGkMemberSettingById(id);
    }

    /**
     * 查询用户偏好设置列表
     * 
     * @param gkMemberSetting 用户偏好设置
     * @return 用户偏好设置
     */
    @Override
    public List<GkMemberSetting> selectGkMemberSettingList(GkMemberSetting gkMemberSetting)
    {
        return gkMemberSettingMapper.selectGkMemberSettingList(gkMemberSetting);
    }

    /**
     * 新增用户偏好设置
     * 
     * @param gkMemberSetting 用户偏好设置
     * @return 结果
     */
    @Override
    public int insertGkMemberSetting(GkMemberSetting gkMemberSetting)
    {
        return gkMemberSettingMapper.insertGkMemberSetting(gkMemberSetting);
    }


    @Override
    public int insertGkMemberSettingList(List<GkMemberSetting> list){
        return gkMemberSettingMapper.insertGkMemberSettingList(list);
    }

    /**
     * 修改用户偏好设置
     * 
     * @param gkMemberSetting 用户偏好设置
     * @return 结果
     */
    @Override
    public int updateGkMemberSetting(GkMemberSetting gkMemberSetting)
    {
        return gkMemberSettingMapper.updateGkMemberSetting(gkMemberSetting);
    }

    /**
     * 批量删除用户偏好设置
     * 
     * @param ids 需要删除的用户偏好设置主键
     * @return 结果
     */
    @Override
    public int deleteGkMemberSettingByIds(Long[] ids)
    {
        return gkMemberSettingMapper.deleteGkMemberSettingByIds(ids);
    }

    /**
     * 删除用户偏好设置信息
     * 
     * @param id 用户偏好设置主键
     * @return 结果
     */
    @Override
    public int deleteGkMemberSettingById(Long id)
    {
        return gkMemberSettingMapper.deleteGkMemberSettingById(id);
    }

    public int deleteGkMemberSettingByCodes(GkMemberSetting gkMemberSetting){
        return gkMemberSettingMapper.deleteGkMemberSettingByCodes(gkMemberSetting);
    }
}
